package com.horus.entities.user;

import java.util.Date;
import java.util.List;

import com.horus.entities.payment.BillAddress;
import com.horus.entities.payment.PaymentMethod;

public class User {
	
	private long id;
	private String username;
	private String email;
	private PasswordDigest passwordDigest;
	
	private Community selfCommunity;
	
	private String firstName;
	private String secondName;
	private String lastName;
	private BillAddress contactInfo;
	List<PaymentMethod> paymentMethod;
	
	private Date lastLogin;
	private Date creationDate;
	private Date lastModification;
	private boolean isActive;
	
	private int version;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public PasswordDigest getPasswordDigest() {
		return passwordDigest;
	}

	public void setPasswordDigest(PasswordDigest passwordDigest) {
		this.passwordDigest = passwordDigest;
	}
	
	public String getPassword(){
		
		return this.passwordDigest.getEncryptedPassword();
	}
	
	public void setPassword(String password){
		
		this.passwordDigest.setEncryptedPassword(password);
	}

	public Community getSelfCommunity() {
		return selfCommunity;
	}

	public void setSelfCommunity(Community selfCommunity) {
		this.selfCommunity = selfCommunity;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getSecondName() {
		return secondName;
	}

	public void setSecondName(String secondName) {
		this.secondName = secondName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public BillAddress getContactInfo() {
		return contactInfo;
	}

	public void setContactInfo(BillAddress contactInfo) {
		this.contactInfo = contactInfo;
	}

	public List<PaymentMethod> getPaymentMethod() {
		return paymentMethod;
	}

	public void setPaymentMethod(List<PaymentMethod> paymentMethod) {
		this.paymentMethod = paymentMethod;
	}

	public Date getLastLogin() {
		return lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public Date getLastModification() {
		return lastModification;
	}

	public void setLastModification(Date lastModification) {
		this.lastModification = lastModification;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

}
